<!DOCTYPE html>
<html    lang="en" xmlns="http://www.w3.org/1999/xhtml"
         xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <div class="form-group">
                            <input id="pid" name="pid" type="hidden"
                                   th:value="${pid}">
                            <label class="col-sm-3 control-label">上级分类：</label>
                            <div class="col-sm-6">
                                <input   readonly class="form-control" id="pidName" type="text" th:value="${pidName}">
                            </div>
<!--                            <div id="addPIDFunctionButtons">-->
<!--                                <input id="reset" class="btn btn-warning" type="button"  value="重置">-->
<!--                                <input id="parentSelect" class="btn btn-warning" type="button" value="选择父分类">-->
<!--                            </div>-->
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">分类名称：</label>
                            <div class="col-sm-8">
                                <input id="name" name="name" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-3 ">
                                <label class="control-label" style="float:right">分类图片：</label>
                            </div>
                            <input id="picture" name="picture" class="form-control" type="hidden">
                            <div class="col-sm-8">
                                <button type="button" class="layui-btn" id="uploadBtn">
                                    <i class="fa fa-cloud"></i>上传文件
                                </button>
                                <div  id="pictureShow"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">是否激活：</label>
                            <div class="col-sm-8">
<!--                                <input id="isactive" name="isactive" class="form-control" type="text">-->
                                <div class="switch onoffswitch col-sm-1">
                                    <div class="onoffswitch">
                                        <input id="isactive" name="isactive"
                                               type="checkbox"
                                               value="1"   checked=""   class="onoffswitch-checkbox"
                                        > <label class="onoffswitch-label" 	for="isactive">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group isonmainpage" th:if="${pid==null}" >
                            <label class="col-sm-3 control-label">是否首页显示：</label>
                            <div class="col-sm-8">
<!--                                <input id="isonmainpage" name="isonmainpage" class="form-control" type="text">-->
                                <div class="switch onoffswitch col-sm-1">
                                    <div class="onoffswitch">
                                        <input id="isonmainpage" name="isonmainpage"
                                               type="checkbox"
                                               value="1"     class="onoffswitch-checkbox" >
                                        <label class="onoffswitch-label" 	for="isonmainpage">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                    </div>
                                </div>
                            </div>
                        </div>
						<div class="form-group">
                            <div class="col-sm-3 ">
                                <label class="control-label" style="float:right">分类图标：</label>

                            </div>

                            <input id="icon" name="icon" class="form-control" type="hidden">
                            <div class="col-sm-8" >
                                <button type="button" class="layui-btn" id="iconuploadBtn">
                                    <i class="fa fa-cloud"></i>上传文件
                                </button>
                                <div id="iconShow"></div>
                            </div>
						</div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="/js/layui.js"></script>
<script type="text/javascript" src="/js/appjs/shop/productcategory/add.js">
</script>
</body>
</html>
